package faceoff.sample;

public enum SampleBoardColumn {
	TITLE("title"), CONTENT("content"), USERID("user_id"), CREATE_DATE("create_date"), UPDATE_DATE("update_date");

	private final String name;

	SampleBoardColumn(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public static SampleBoardColumn find(String columnName) {
		for (SampleBoardColumn each : SampleBoardColumn.values()) {
			if (each.name.equals(columnName)) {
				return each;
			}
		}
		throw new IllegalArgumentException();
	}

}
